//package com.li.controller.configure;
//
//import com.li.filter.RocketMqConsumerMessageHook;
//import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
//import org.apache.rocketmq.spring.core.RocketMQPushConsumerLifecycleListener;
//import org.apache.rocketmq.spring.support.DefaultRocketMQListenerContainer;
//import org.apache.rocketmq.spring.support.RocketMQListenerContainer;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.BeanPostProcessor;
//import org.springframework.stereotype.Component;
//
///**
// * @program: rocketmq_boot
// * @description:
// * @author: li
// * @create: 2023-03-08 17:01
// **/
//@Component
//public class DefaultMQPushConsumerBeanPostProcessor implements BeanPostProcessor {
//    @Override
//    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        if (bean instanceof RocketMQListenerContainer) {
//            DefaultRocketMQListenerContainer container = (DefaultRocketMQListenerContainer) bean;
//            container.getConsumer().getDefaultMQPushConsumerImpl().registerConsumeMessageHook(new RocketMqConsumerMessageHook());
//        }
//        return bean;
//    }
//}
